﻿using System;
using System.Collections.Generic;
using System.IO;

namespace Com.PhilChuang.Utils
{
	public interface IAppFile
	{
		bool DirectoryExists (String path);
		void CreateDirectory (String path);
		void CreateDirectoryIfNotExists (String path);
		void DeleteDirectory (String path);
		void DeleteDirectory (String path, bool recursive);

		IEnumerable<String> GetFilesIn (string path);
		IEnumerable<String> GetDirectoriesIn (string path);

		void FileDelete (String path);
		bool FileExists (String path);
		void FileOpenRead (String path, Action<Stream> doStreamWork);
		void FileCreate (String path, Action<Stream> doStreamWork);
		void FileAppendText (String path, Action<StreamWriter> doStreamWriterWork);
		long GetFreeSpace ();

	}
}
